#ifndef SEQUENTIAL_STACK_H
#define SEQUENTIAL_STACK_H

#include "stdio.h"
#include "stdlib.h"

#define STACK_INIT_SIZE 10

typedef int ElemType;

typedef struct SequentialStack {
    int top;
    ElemType *data;
    int size;
} SequentialStack;

SequentialStack *init_stack();

int is_empty(SequentialStack *stack);

ElemType top(SequentialStack *stack);

void push(SequentialStack *stack, ElemType data);

ElemType pop(SequentialStack *stack);

int size(SequentialStack *stack);

void clear_stack(SequentialStack *stack);

void pop_all(SequentialStack *stack);

#endif  // !SEQUENTIAL_STACK_H define